﻿using Microsoft.AspNetCore.Authentication;
using WorkLogSystem.Authentication;
using WorkLogSystem.Options;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class CustomTokenExtensions
    {
        public static AuthenticationBuilder AddCustomToken(this AuthenticationBuilder builder)
        {
            return builder.AddScheme<CustomTokenOptions, CustomTokenHandler>(
            "CostomToken",
            option => { option.TokenHeaderName = "token"; });
        }
    }
}
